home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / v10n05.arc / 2BOTH.ARC / COMPILER.H < prev    next >
Text File  |  1991-02-13  |  3KB  |  80 lines

  1. /* PROJECT....:  2FILE.C and 2FLOPPY.C
  2. ** FILE.......:  compiler.h
  3. ** VERSION....:  1.0 (Turbo C++ 1.0 & MSC 5.0)
  4. ** AUTHOR.....:  Stephen D. Cooper
  5. ** NOTICE.....:  Copyright 1990 ZIFF Communications Co.
  6. **
  7. ** NOTES......:  This header file isolates and makes up for MOST of
  8. **         the differences between Turbo C and MSC.  It also
  9. **         contains one #define (#define TURBO_C or #define MSC)
  10. **         that is used by other files.  Please see the
  11. **         comments that precede this line in this file.
  12. */
  13.  
  14. #if !defined(_COMPILER_H_)
  15. #define _COMPILER_H_
  16.  
  17. /*
  18. ** Compiler specific #define --
  19. ** If you're compiling with Turbo C ==> #define TURBO_C
  20. ** If you're compiling with MSC        ==> #define MSC
  21. */
  22. #define TURBO_C
  23.  
  24. /********************************************************************
  25. **        #define CONSTANTS                       **
  26. ********************************************************************/
  27.  
  28. /*
  29. ** Turbo C and MSC specific library
  30. ** function names and constants turned into our own
  31. ** names.  We also include those .H files that are unique to
  32. ** the compilers or that one compiler needs and the other doesn't
  33. */
  34. #if defined(TURBO_C)
  35. #define HARDERR       harderr
  36. #define HARDRETN      hardretn
  37. #define MAKEPATH      fnmerge
  38. #define SPLITPATH     fnsplit
  39. #define HARDERR_HANDLER int harderr_handler(int errval, int ax, \
  40.                         int bp, int si)
  41. #include <dir.h>
  42. #include <mem.h>
  43. #else
  44. #define HARDERR       _harderr
  45. #define HARDRETN      _hardretn
  46. #define MAKEPATH      _makepath
  47. #define SPLITPATH     _splitpath
  48. #define MAXPATH       _MAX_PATH
  49. #define MAXDRIVE    _MAX_DRIVE
  50. #define MAXDIR          _MAX_DIR
  51. #define MAXFILE       _MAX_FNAME
  52. #define MAXEXT        _MAX_EXT
  53. #define HARDERR_HANDLER void far harderr_handler(unsigned ax, \
  54.                         unsigned di, unsigned far *devhdr)
  55. #include <graph.h>
  56. #include <types.h>
  57. #include <memory.h>
  58. #endif
  59.  
  60. /********************************************************************
  61. **        #define MACROS                          **
  62. ********************************************************************/
  63.  
  64. #if !defined(TURBO_C)
  65. /*
  66. ** Add MK_FP() to MSC's bag of tricks
  67. */
  68. #define MK_FP(s, o) ((void far *)(((long)(s) << 16) + (o)))
  69. #define GOTOXY(x, y) _settextposition((y), (x))
  70. #else
  71. #define GOTOXY(x, y) gotoxy((x), (y))
  72. #endif                        /* #if !defined(TURBO_C) */
  73.  
  74. #endif                        /* #if !defined(_COMPILER_H_) */
  75. /*******************************
  76. ********************************
  77. **** END OF FILE compiler.h ****
  78. ********************************
  79. *******************************/
  80.